package com.cmc.cloud.cmclink.doc.convert;

import com.cmc.cloud.cmclink.doc.api.document.rep.DgCommodityRespDto;
import com.cmc.cloud.cmclink.doc.entity.DgCommodityDO;
import com.cmc.cloud.cmclink.doc.vo.special.dgcommodityvo.DgCommodityExportExcelVO;
import com.cmc.cloud.cmclink.doc.vo.special.dgcommodityvo.DgCommodityImportExcelVO;
import com.cmc.cloud.cmclink.doc.vo.special.dgcommodityvo.DgCommodityRespVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 危险品品名库 Convert
 *
 * @author 集运管理员
 */
@Mapper
public interface DgCommodityConvert {

    DgCommodityConvert INSTANCE = Mappers.getMapper(DgCommodityConvert.class);

    /**
     * 属性转换 convert
     *
     * @param bean
     * @return
     */
    DgCommodityRespVO convert(DgCommodityDO bean);

    /**
     * 属性转换 convert
     *
     * @param list
     * @return
     */
    List<DgCommodityRespVO> convertList(List<DgCommodityDO> list);

    /**
     * 属性转换 convert
     *
     * @param list
     * @return
     */
    List<DgCommodityExportExcelVO> convertExcelList(List<DgCommodityDO> list);

    /**
     * 属性转换 convert
     *
     * @param list
     * @return
     */
    List<DgCommodityDO> convertExcelDOList(List<DgCommodityImportExcelVO> list);

    /**
     * 属性转换 convert
     *
     * @param dgCommodityDOList
     * @return
     */
    List<DgCommodityRespDto> convertRpcDgCommodityRespDto(List<DgCommodityDO> dgCommodityDOList);
}
